﻿using BusinessObjects.BusinessRules;

namespace BusinessObjects.BussinessVoucher
{

    /// <summary>
    /// FixedAssetVoucherDetail
    /// </summary>
    public class FixedAssetVoucherDetail : BusinessObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="FixedAssetVoucherDetail" /> class.
        /// </summary>
        public FixedAssetVoucherDetail()
        {
            AddRule(new ValidateRequired("RefId"));
            // AddRule(new ValidateRequired("BudgetItemCode"));
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="FixedAssetVoucherDetail" /> class.
        /// </summary>
        /// <param name="refDetailId">The reference detail identifier.</param>
        /// <param name="refId">The reference identifier.</param>
        /// <param name="fixedAssetId">The fixed asset identifier.</param>
        /// <param name="description">The description.</param>
        /// <param name="accountNumber">The account number.</param>
        /// <param name="correspondingAccountNumber">The corresponding account number.</param>
        /// <param name="amountOc">The amount oc.</param>
        /// <param name="amountExchange">The amount exchange.</param>
        /// <param name="voucherTypeId">The voucher type identifier.</param>
        /// <param name="budgetSourceCode">The budget source code.</param>
        /// <param name="accountingObjectId">The accounting object identifier.</param>
        /// <param name="budgetItemCode">The budget item code.</param>
        /// <param name="quantity">The quantity.</param>
        /// <param name="unitPriceOc">The unit price oc.</param>
        /// <param name="unitPriceExchange">The unit price exchange.</param>
        /// <param name="departmentId">The department identifier.</param>
        /// <param name="budgetChapterCode">The budget chapter code.</param>
        /// <param name="budgetCategoryCode">The budget category code.</param>
        /// <param name="projectId">The project identifier.</param>
        /// <param name="autoBusinessId">The automatic business identifier.</param>
        public FixedAssetVoucherDetail(long refDetailId, long refId, long fixedAssetId, string description,
            string accountNumber, string correspondingAccountNumber, decimal amount, long voucherTypeId, long projectId, int quantity,
            decimal unitPrice, long departmentId, string accountNumberVat,decimal amountVat, long autoBusinessId)
            : this()
        {
            RefDetailId = refDetailId;
            RefId = refId;
            FixedAssetId = fixedAssetId;
            Description = description;
            AccountNumber = accountNumber;
            CorrespondingAccountNumber = correspondingAccountNumber;
            Amount = amount;
            VoucherTypeId = voucherTypeId;
            AccountNumberVat  = accountNumberVat;
            AmountVat = amountVat;
            Quantity = quantity;
            UnitPrice = unitPrice;
            DepartmentId = departmentId;
            ProjectId = projectId;
            AutoBusinessId = autoBusinessId;
        }

        /// <summary>
        /// Gets or sets the reference detail identifier.
        /// </summary>
        /// <value>
        /// The reference detail identifier.
        /// </value>
        public long RefDetailId { get; set; }

        /// <summary>
        /// Gets or sets the reference identifier.
        /// </summary>
        /// <value>
        /// The reference identifier.
        /// </value>
        public long RefId { get; set; }

        /// <summary>
        /// Gets or sets the fixed asset identifier.
        /// </summary>
        /// <value>
        /// The fixed asset identifier.
        /// </value>
        public long FixedAssetId { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the quantity.
        /// </summary>
        /// <value>
        /// The quantity.
        /// </value>
        public int Quantity { get; set; }

        /// <summary>
        /// Gets or sets the unit price oc.
        /// </summary>
        /// <value>
        /// The unit price oc.
        /// </value>
        public decimal UnitPrice { get; set; }

        /// <summary>
        /// Gets or sets the account number.
        /// </summary>
        /// <value>
        /// The account number.
        /// </value>
        public string AccountNumber { get; set; }

        /// <summary>
        /// Gets or sets the corresponding account number.
        /// </summary>
        /// <value>
        /// The corresponding account number.
        /// </value>
        public string CorrespondingAccountNumber { get; set; }

        /// <summary>
        /// Gets or sets the amount oc.
        /// </summary>
        /// <value>
        /// The amount oc.
        /// </value>
        public decimal Amount { get; set; }

        /// <summary>
        /// Gets or sets the voucher type identifier.
        /// </summary>
        /// <value>
        /// The voucher type identifier.
        /// </value>
        public long VoucherTypeId { get; set; }

        /// <summary>
        /// Gets or sets the department identifier.
        /// </summary>
        /// <value>
        /// The department identifier.
        /// </value>
        public long DepartmentId { get; set; }

        /// <summary>
        /// Gets or sets the budget category code.
        /// </summary>
        /// <value>
        /// The budget category code.
        /// </value>
        public string AccountNumberVat { get; set; }

        /// <summary>
        /// Gets or sets the budget chapter code.
        /// </summary>
        /// <value>
        /// The budget chapter code.
        /// </value>
        public decimal AmountVat { get; set; }

        /// <summary>
        /// Gets or sets the department identifier.
        /// </summary>
        /// <value>
        /// The department identifier.
        /// </value>
        public long ProjectId { get; set; }

        /// <summary>
        /// Gets or sets the merger fund identifier.
        /// </summary>
        /// <value>
        /// The merger fund identifier.
        /// </value>
        public long AutoBusinessId { get; set; }

    }
}
